package com.zmc.admin.infrastructure.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zmc.admin.infrastructure.entity.SysDeptEntity;
import com.zmc.admin.infrastructure.bean.query.SysDeptQuery;
import com.zmc.admin.infrastructure.bean.vo.menu.TreeSelect;

import java.util.List;

/**
 * 部门表
 *
 * @author zmc
 * @email 
 * @date 2024-10-09 17:27:49
 */
public interface SysDeptService extends IService<SysDeptEntity> {

    List<SysDeptEntity> selectDeptList(SysDeptQuery dept);

    boolean checkDeptNameUnique(SysDeptEntity dept);

    int selectNormalChildrenDeptById(Long deptId);

    boolean hasChildByDeptId(Long deptId);

    boolean checkDeptExistUser(Long deptId);

    List<Long> selectDeptListByRoleId(Long roleId);

    List<TreeSelect> selectDeptTreeList();

    List<TreeSelect> buildDeptTreeSelect(List<SysDeptEntity> depts);

    List<SysDeptEntity> buildDeptTree(List<SysDeptEntity> depts);

}

